control ps1 length