2014-6-4-ugly-code-seems-like-working