updated hbonds 1d and 2d code