fixed coding bug that only seems to work with firefox, do not pass variables with declaration or you might not get anything to work