fix depricated functions