required and length fns