added some sql script to the json file and added functions in the controller