Pseudo code for parsing data