Yes. As par to my algorithm I check whether the function itself is the gen what we are expecting to calculate the degree. And next two lines follow (4258 & 4259) is like "if the function has the gen inside and if it is a bounded power function (say A**B) then do ..."