add token calcultations for CompositeKey. Fix range contains