almost function complete version