finished chapter4 and readPrograms