moved state factory and added attribute for comment for state_id
moved state factory and added attribute for comment for state_id