commented avg time function because of errors