added track length variable