fix v5 removed deprecated method