code correct but direc1 global