UPD adding some code examples for the Rules implementation