added guestbook example and separated code