trying to make the logic work