usign global var, should prob stop this