sml functions
sml functions