review and minor improvements