decrease code complexity