added helper method and used ${basedir} to fix PR