added a parse function