Updated client to use states