updated to fix errors