added some supporting methods