make method static. add test.