get logic operatrions right