removed unnecessary table variable
renamed all the capitalized functions