finish partial version implementation