Reducing amount of functions