coded basic parsing, need to finish error handling