api chaining improvement; better checking. can move functionality away from filter and into classes for better testing now