#core: a few core javascript functions added