updaeted variable function for some of the tables with variables