added code for preparse input processing