add support for basePath - closes #6