implemented clearscreen() which clears the screen