fix any bug and comments. add test