added core javascript functionality