add all sample calculation