added function to add coeffs of each hiearchical level