prettified code, fixes #11