function complete version