move functions out to their own files