implemented cell/pool rollback in Scala