bug with non-img elts fixed
support for nonimg elts refactored