added logic statement