need to implement making non-global agent
included define scope