Adding pseudocode and test case