Added comments, added a custom update example