Sort writer