working on rate STDP function