removed unnecessary constructor for rays