add BASEPATH conditional