cleanup and attempt at using folly