fix usage of extern
remove static