pass interface as parameter