added a small psudosode.