Updated, now works against user input