worked on remove fields function