Amend code to work for different situations

Printable View