create and append modal element