separated variables and values into two arrays