changed deprecated functions