return value of get_remaining_bin function is updated, related tests are also updated.