fixed rule for looking for System.in.
made better rule checks.