Add slope calculation