fix function specs according to actual data types