Studying Cognitive Functions with Virtual Reality