#529: add rules, change tests