fixed usage of deprecated methods