made inputsource virtual. TODO: make layer virtual