Move getbalance in separate non blocking function