My state management was bugging me. This is a little nicer