tidy up and import recommendation functions