How to create and use chained variables