reimplement collision detection

Signed-off-by: Nepetalactone <tobias.meusburger@gmx.net>