moved parsing code out to their own files