fix bug, i should write tests..