add back in some error handling