cleaned up uptime calculation significantly