implemented '/add' related logic