calculateSLP is function on hw