Use interface rather than concrete class during casting