added auto-update functionality