implement first version of package controller.