How do I automate my way out of this