improved block rotation