Less is more, more or less~ remove duplicated code