Added some util funcs