fixed the constrctor in add