adding delete dim function