decrease complexity of functions