Project PR

The if nest is too deep po. Please refactor so that it is easy to read :bow: