better code for interfaces