test mode and better formatting