flatten vars