Same functionality as project1 but using RPC