extracting helperfunctions in a new file