simplify state passing