removed return and added some extra codes to it