Pseudocode adapted to be more detailed