updated generate cv javascript