added calc with javascript