add ids; respect zorder on rendereing