implemented state pattern to switch among screen