if/else added to detect