merge
working gradient, no algo yet