fix some stuff for error handling here