add some helper method and test