edited logic patterns. fixed firefox css