some utility methods were added.