tutorial from ray