added axis aligned collision detection