filter method added
Mantis main function optimized