making a stupid optimizer