Reverted to old algo for calculating degree