simplify _createElement function