added initial logic for the Finit Automation