add some utiliies functions