Working for sample input