Still working in progress. Modified scope