added more methods in util

It took one hour to make it work.