iOS bac calc for OO class