implemented more gradients and extended and refactored tests