added a functional parser using immutable maps