creating doms dynamically, 'exists' function for literal objects