some gradients implemented. I think something is still wrong.