Added commonly used method

It's been 2 years, I am not sure if this PR is relevant anymore.