define scope controller
add scope object and malor refactor