added ray class and tests