ugly error handling xtrv pls ficks