changed deprecated fns. avoid chained assignemtns