move denormalisation to function