factor out functions to helpers/paths