change to use log in variable