added new comments to insertAfter method, change code format