added email registration functions and moving average method for voting