changed to flask json lib