changed some things which have been depricated