deomstrating defensive programming techniques