updated to fix some errors