Change deprecated function