Simple refactor introducing the addRecord function