traintip intial code