Convert function signature and add imports