refactors to use more clear logic to access application path