Implemented slope calculator