add some logic to handle state transitions for listing