defined method to parse