style adjustment
fix state comparison logic