also added some convenient functions