now handles functions with multiple different signatures