factor this out
add the rest of the parser functions
clean up test warnings