refactor bundle for performance