somehow work, but there's a infinite loop