queens - rule function