code format and add trace() function