added a json response for take photo and some bugfixes