Added logic to show photos