Creating parse function