mostly finished the detailed rules