working for sample version 1.0