Adding subscription api and tests