more elegant config handling on shape factory