Replacing deprecated methods