filter cards by cost working, includes tests