extending javascript stuff