Ugly code