draw track base in separate function