adding util functions.