using solve method instead own calculation

(both methods return same results)