refactored component implementation
added instanceof constraint