more helpful JS functions for your pleasure!