working multiloot with minor problems