shorten some code