everything is working, but jankily. code cleanup and refactor to come