added if statement to control usage of chapter image