minor enhancements as per sir suggestion