Start to implement uptime function