I am trying to write a server class with a method that takes a function as an argument and pass in a value (generated inside the server class) to the function for being run