fix bank calculations