Made clear function cross-platform