collision detection

Simple collision detection below is working, but needs to be tweeked to
work properly