Made some changes to make selecting names automatic