Added pseudocode to JS file