fixing initialization and delegate