further writing, corrections and renaming