need fix bug in Add function