added server controller class and started adding JSON parsing