added if statement for touch/nontouch