added slope prediction