started generalizing Variable to allow indexing