A seemingly working script! next goal: optimize the look and style to get around 250 lines