Fixes: makin results JSON serializable and passing ratio as parameter