fix depcrated functions