done reading ch12. code samples