updated to respond with state if available