changes from debugging after errors