added more code for parsing