filtering out unneeded definitions