updated initialization js