add basePath support