implemented lambda expression for exclude and or