adding ray casting