fixed issue related to unique tokens and calculation