JavaScript version of PhD project