changed structure a little bit