few changes from last commit just updated and added to a few functions