fix'ed deprecated code