added controller input method