setting type based on size (now the size defs can be changed in the future without adapting the code)