updated pseudocode and added input data description