implemented function for collecting and confirming dynamic variables.