added testcase for self condition and fixed self conditions