problem solved

issue due to global variable