adding better implementation of adagrad but still has bad performance