added parser function to skip spaces