rollback to th prev book, WIP: middlewares