fixed bug in nextBtn. Implemented code behind pattern box in tracker.