now accepts scope controller as parameter.