-changes to function.php to support api \n
-added necessary stuff for json request values.