more testable code, should write tests first, I know better then this.