check nested conditions work