uncommented enemy detection code