small tweaks to user-friendly JS functions