Added all JS functions