working javascript interface