Created a parse function