introduced rest module to handle mysql queries