add error handling and some fanciness