Make into function.