working on transferring to file. Messy as fuck. crashes.