added pseudocode
add pseudocode