changed isInstanceOf to a class member isInstance
changed asInstanceOf to a class member asInstance
removed unnecessary wrapping code
make the initialized method optional