add error handling for bad syntax and params