corrected documentation to use 'andThen' method instead of deprecated 'then' method