add log function
log works