added dynamic learning rate