added a branch filter method