wrote CreateSignal function, needs to be tested