fix #14 by passing in a filter type and only passing block if it is given