Implemented basic adding and comparing function