Add some utilities functions

Add some utilities functions