tweak algo for readability purposes