added some useful utility method