refactored camera fragment