Working version
New crossing code workds
added mikes code to master