in ms.
       */
      function fade_in(element, time) {
        return new Promise((resolve) => {
          var time_per_increment = time / 100;

          var fade_in = setInterval(function () {
            if (!element.style.opacity) {
              element.style.opacity = 0.4;
            }

            let currentOpacity = parseFloat(element.style.opacity);
            if (currentOpacity >= 0.95) {
              clearInterval(fade_in);
              element.style.opacity = 1;
              element.styl