trimmed useless code