finish as function