TODO added
catch errors in main public API + formatting