init ops correctly
replaced deprecated method