added lodash, checking if profieles have @id to determine if it needs to be POSTed or PUTed