Added functionality to check for same name