updated with source for lab #2