stdin processing added