changed order of functions (nothing really changed)