Pseudocode and setup