Infinite next / prev post in single.php page

I have a question regarding this code. When the last entry appears in then "next" I show the same page all the time. In addition, I would like to add a thumbnail display of the next post and a title to this. Is it possible?

<?php     if( get_adjacent_post(false, '', true) ) {             previous_post_link('%link' , '%title', '&larr; ');         } else {             $  first = new WP_Query('cat=3&posts_per_page=1&order=DESC'); $  first->the_post();              echo '<a href="' . get_permalink() . '">&larr;</a>';              echo ('%title');             wp_reset_query();         };          if( get_adjacent_post(false, '', false) ) {          } else {             $  last = new WP_Query('cat=3&posts_per_page=1&order=ASC'); $  last->the_post();                 echo '<a href="' . get_permalink() . '">Next Post &rarr;</a>';             wp_reset_query();         };      ?> 

Please help, gentlemen and ladies