Updated js to be a funtion