some small edits, cleaned up ucb method