realized problem with add function, nearly fixed
fully functional add