Updating Engine to new API
update middleware