added uniqid function to generate IDs