minor code edits. review state and resources approach