fleshed out both REST endpoints