added gradients
updating grid with tests