Delete function almost done