moved main to top and now clearing screen once and resetting cursor position after