half way
bug fix and code refactor
filter works on endpoint