formatting and made context optional
added $ as additional output possibility for vars