extra import removed and missing code added