pseudocode, two methods