minor fixes
minor fixes
output simplified / unoptimised versions