refactored interface spec and interface