added all database interaction and gps tracking