removing unused records