first attempt at filtering output