refactored package sources to all work correctly