add rest methods with tests