created method and injected into controller