correct code after working with Shadi