refactored info from rpc to mod + added some basic error handling