fixing #26: code cleanup