merged hp6 into this branch