remove several packages, rewrite apply to list for easier read