Horrible code