moving script out, adding filter options