some corrections and design changes