added basedir implementation