Less than 50 SLOC and it works also