Requires that  is a function before calling it