fixing scope coz was deprecated