add common util functions