improved reducer and readme. added sample input