refactor packing of applictions