Updates. Not fully working with correct results.