Finally settled on a solution for the newton problem I am happy with