shaking some bugs out of the script