added a parseSync function