improve pattern observer