make more robust for building in other directories