add relevant files from *ib-ruby* implementation