Added helpful comments, still need to fix it so it runs when given just one coefficient