removed deprecated function and replaced