versatile state managing abstraction