add polling and init REST server