added pause screen and changed center method