progress on input preprocessing