replaced a deprecated method