use strongly typed fuction passing