changed to use underscorejs and jquery