Implemented trait for getId function