finish reimplementing