updated figuring out time function in drawview