simplified the function types