finish initial implementation