add stupid error handling