made state and globals class