Turned pretty into function