Initial state logic code