choose the correct component factory