used ternary operator for target size condition