moved functions to different file to prevent IDE complaints