code clean up, working on filter