modified shape adding procedure, makes less flickering