input processing hooks