fix formatting bug and add limit arg