tweak element logic