changes parse function to list comp