cleaned up so code based on feedback from go-nuts irc