I need to abstract this define package function