forked from: Sludge

勢いのみで、全然最適化してないです（所々やや重い）
@author ue