removed upsmon init outside of loop