Minor change:allow child class to access factory