first attempt of integrating custom variables, see #3