add terms functions