Commented on advanced code