state machine improved and initial states created (added files)