added vertical/horizontal ddetection
Merge branch 'master' of github.com:franklinyang/MosqTeam1