updated package factory