use borrow and borrow_mut instead of with and with_mut