take into account opening balance