annoying loop that doesn't work.