commented out some debug prints
function run(): option standalone to distinguish between printing and
returning results
closes #5 (unify JSON output), fix a bug where half was not found
correctly