refactoring: no need for wrapping in do
indentation
performance tweaks