added length to callback