implemented error callbacks, not sure how they'll work yet