add method and update test logic