added valid filtering and some visualization