remove deprecated function and update