get (), constructor and fixing mistakes

fixed mistakes in add(), added constructor and get method