top and bottom correction