Added slope calculations