Added the programstate class