Changed type to readonly
Implemented the IDL
New implementation using polymorphism as intended