get vars and chaining function