fixed usage of deprecated function
update function docs