WIP: make simple RPC handler