make it compile with latest flint
add rudimentary functions