fix variable names and ensure uniqueness of values