added security for favorites