replaced log macro with functions...