some refactoring in php file to make sure the outputArea would have a content, https://app.asana.com/0/15843277689885/16047142172255