move length magic number to config.h