update for newest OOOREST
minor fix
refactor toward a much more decent design