finiteruinprob: included all main functions