fixing up the javascript, problem still with create refresh