more error corrections. only bugs remain