put state in a common strcuture