add order by feature; refactor code to load code from json file inside app