more helpers and better log