js pattern II