removing deprecated method calls.