first working version of dynamic input spawning