added some helper methods.