shorten the code, but still redundant