Refector and add new test