introduced method; removed dead code