pattern algorithms with json loader example2