followed example and completed api-proof