bug fix
refractor
remove the global instance