better organization of parser functions