extracted js to functions