finally finished iprb solution!