scheme mostly done