Divided into function.