Figuring out the best way to use this code still