refactor code for id