fixed refreshing online info
simplify bash script