finalize replacing folders with categories