Main methode should work now with rpc communication