use maps instead of records