replace depricated variable