This is doing way more then setting the state...