define, function are working more properly