function moved to pre-jstd