implemented rpc library
bugfixes