jh - attempted to merge everything :(