refactoring code to unified uniqueId, and replace hardcode logic for screen id