auto adjust top and left