changed check to check based on name not on object type
updates