remove unnecessary do blocks
encapsulate this hack a bit better