need to deal with multiple last state