added onCreate to the js implementation of kernel