how to comban state and comp?