changed to use interfaces