added javascript helpers