bug fixes and upgraded version