added the top and down detection
Merge branch 'master' of github.com:teamwavead/demo