This can be moved to below the if/else structure, so it doesn't need to be repeated. I'll fix.