swap depricated functions