rayCasting working with grid, now normal and future refactor complete code