added if statement for interfaces