check bank solvency function