remove duplication in tracks.js