Basically working automation(except it's all wrong)