Averaging functions added for sent online data, put in use for momentum and direction