solves ok but not smart