refactored tagging photos