added activity indicator, did some simplification