improve comment function