fixes bugs due to syntax in add functions in each corresponding class