Updated to store all variables