decouple route adding from API add method