reworked to use archive module