taking some base_path advice from matt mccullough