initial rule factory factory implmentation with test