build of foldbylevel