refactor so that the app root is a variable