fix bug in _get_proportions, add half of account algorithm