some error handling generic stuff, also scrapping a few experiments