error design + minor changes