added filter to all functions, argument orders more consistent.