added support for last variable