implemented vertical block for AI
fixed small bug