fix big hairy hardcoded mess