fixed problems with database schema
rewritted the classed to use the tracks from database