added mixing and refactored h5bp