using new function: merge_hashes.

Relates to issue #8.

@jsmartin, @andrewjstone, @Iristyle - could you please verify that this branch
solves the problem?