tried to make it easier to understand