new comments added for tracing $result variable