function complete Ver 1.0