WIP: refactor of bridge