input optimization