trimmed to compile