works for presen attr, but still needs clean up