correct input optimization #15