pe23 still working on method. rewrite to increace performance