updated qrcreate function