refactor with CogipixCommonBundle