Shawn Gregory takes plea deal