bunch of changes to make h2o work