add some helper function