implements most recent notes on handling state and adds new tested utils