complete function sample