Adding pseudo code for front-end