Peusdo code for lab 4 b