change printf logic for testing