fixed deletion problem
half solved