text justification algorithm