small changing in architecture of js