took methods out of input controller for better readability