-indented code
-added network check before getting place detail