Added the update loop (commented)