getObjecctById is moved to be a global method