changed to not use a deprecated method