Coding in the logic
Added working remove code