JavaScript Grampus logic is taken from existing JS in github