code cleanup
adding auto-update