initial pseudocode