lab7.1 lab7.2 with smarty