added js version 1