Putting delegate in the constructor