fixing js function again again