sets up delegate