added spacial grid and collision rectangle stuff