added some minor improvements