fix bug and first test with UP,CONT,DOWN passed.