added special case for simple push
fixed imports
avoid duplicated variant iteration and unnecessary database hits