refactored rest to use new sserver side events