common input processing