Added function to get id