Working api and websocket
extra stuff