fixing one of the bugs, but still not passing the right type