Give alternative to deprecated function