js version of picmi