saving state - this code is a mess, but I dont want to lose it and my computer is bugging out. initial atom-shell is working