add tube class and edited some variable and function name