implemented js kernel generator