stdin filter function finished