Update home function