move @appDir and get rid of unecessary appDir = reference