tweaks for naming, better error handling