converted scripts to use new Context class