added new parameter that will make changing the target length easy