first implementation of tracking on mongodb