Controller Input code