made some changes to fix some warnings