replaced deprecated call with the "new" way of doing things