made class delegate, broken into different methods