edit rayTraceClass to make it work fine