initial idea

script here is initial idea written in python which already working for calculation, javascript lib will be written later