use the first line as the key source
fix a bug in static method