refactoring common list creation operation