added command attribute to filter_by_distance instead of stderr logging
minor changes