Codes for lab1